Repository navigation
schedule: dp: look up the DP scheduler by core in the LL user thread - #11484
Merged
Merged
Conversation
With CONFIG_SOF_USERSPACE_APPLICATION and CONFIG_SOF_USERSPACE_LL, scheduler_dp_ll_post_tick() runs in the LL user thread on every LL tick and finds the DP scheduler with scheduler_get_user_data(). This now reads the kernel-only copy of the user scheduler list, so the LL thread takes a load/store privilege exception (EXCCAUSE 26) as soon as audio starts. Pass the core of the calling LL scheduler to scheduler_dp_ll_post_tick() and look up the DP scheduler with arch_user_schedulers_get_for_core(), which is safe to call from user threads. Use the same core for the DP lock instead of cpu_get_id(), which reads a privileged register. Fixes: 91c2148 ("schedule: keep user scheduler descriptors read-only to user threads") Signed-off-by: Kai Vehmanen <[email protected]>
kv2019i
requested review from
LaurentiuM1234,
dbaluta,
lbetlej,
lgirdwood,
marcinszkudlinski,
mmaka1,
pblaszko and
plbossart
as code owners
November 18, 2026 11:07
Collaborator
Author
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the DP post-tick scheduler changes.
No open issues 🎉
What changed in this PR
This PR fixes audio-startup privilege exceptions when the low-latency scheduler runs in user space. It updates the data-processing (DP) scheduler’s post-tick handling to avoid kernel-only scheduler data and privileged core-ID reads.
Changes:
- Pass the calling low-latency scheduler’s core ID to the DP post-tick hook.
- Use a user-accessible scheduler lookup and the supplied core ID for DP locking.
- Update the hook’s declaration and parameter documentation.
| File | Description |
|---|---|
src/schedule/zephyr_ll.c |
Passes the scheduler’s core ID to the post-tick hook. |
src/schedule/zephyr_dp_schedule.c |
Uses the supplied core for user-safe DP lookup and locking. |
src/include/sof/schedule/dp_schedule.h |
Updates the hook signature and documents its core parameter. |
Review effort: Balanced
ujfalusi
approved these changes
Nov 18, 2026
PR 11484: test resultsRun date: 2026-11-18 11:47 UTC Tested commit: a6ec1a7ad683be3733b71a3f93484f87ff920ce2 |
lgirdwood
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With CONFIG_SOF_USERSPACE_APPLICATION and CONFIG_SOF_USERSPACE_LL, scheduler_dp_ll_post_tick() runs in the LL user thread on every LL tick and finds the DP scheduler with scheduler_get_user_data(). This now reads the kernel-only copy of the user scheduler list, so the LL thread takes a load/store privilege exception (EXCCAUSE 26) as soon as audio starts.
Pass the core of the calling LL scheduler to scheduler_dp_ll_post_tick() and look up the DP scheduler with arch_user_schedulers_get_for_core(), which is safe to call from user threads. Use the same core for the DP lock instead of cpu_get_id(), which reads a privileged register.
Fixes: 91c2148 ("schedule: keep user scheduler descriptors read-only to user threads")